home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / prog / tpex.arj / C7REVEX4.PAS < prev    next >
Pascal/Delphi Source File  |  1993-09-04  |  921b  |  35 lines

  1. {
  2. Programming in Turbo Pascal 6.0.
  3. Turbo Pascal By Example By Greg Perry.
  4. Chapter 7 Review exercise #4.
  5. Robert E. Wade      9-4-93
  6. }
  7.  
  8. PROGRAM C7RevEx4;
  9.  
  10. USES Crt;
  11.  
  12. CONST    Spc           = ' ';
  13.          RegPay        = 4.50;
  14.          TimeAndHalf   = RegPay * 1.5;
  15.          DoubleTime    = RegPay * 2;
  16.          TaxRate       = 0.28;
  17.          RegHours      = 40;
  18.          TaHHours      = 5;
  19.          DblTimeHrs    = 5;
  20.  
  21.                   { Define Constants that perform the calculations }
  22.  
  23.          GrossPay      = (RegPay * RegHours) + (TimeAndHalf * TaHHours) +(DoubleTime * DblTimeHrs);
  24.          Taxes         = GrossPay * TaxRate;
  25.          NetPay        = GrossPay - Taxes;
  26.  
  27. BEGIN
  28.    CLRSCR;
  29.  
  30.                   { Display data to screen }
  31.  
  32.    WRITELN( 'Gross Pay is: ', GrossPay:8:2 );
  33.    WRITELN( 'Taxes are: ', Spc:2, Taxes:8:2 );
  34.    WRITELN( 'Net Pay is: ', Spc:2, NetPay:8:2 );
  35. END.